package com.practice.pagehelper.service.impl;

import com.github.pagehelper.PageHelper;
import com.practice.pagehelper.entity.UserEntity;
import com.practice.pagehelper.mapper.UserMapper;
import com.practice.pagehelper.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public List<UserEntity> queryPageUser() {
        PageHelper.startPage(1, 2);
        List<UserEntity> userEntities = userMapper.selectAll();
        return userEntities;
    }
}
